Ext.onReady(
    function () {
        store = new Ext.data.JsonStore(
            {
                url: 'get.php',
                data: [],
                fields: [
                    {name: 'id'},
                    {name: 'name'},
                    {name: 'password'}
                ],
                proxy: {
                    type: 'ajax',
                    url: 'get.php',
                    reader: {
                        type: 'json',
                         // root: 'images',
                        idProperty: 'name'
                    }
                },
            });
        store.load();

        new Ext.grid.Panel(
            {
                store: store,
                mode: 'remote',
                title: '简单Grid示例',
                applyTo: 'grid',
                width: 250,
                height: 150,
                frame: true,
                columns: [
                    {header: "id",width: 50,dataIndex: 'id',sortable: true},
                    {header: "姓名",width: 80,dataIndex: 'name',sortable: true},
                    {header: "年龄",width: 80,dataIndex: 'password',sortable: true}
                ],
                renderTo: Ext.getBody()
            }
        );
    }
);
